package cn.ycxy.lbl.pojo.posts.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_NULL)  //忽略为null的字段序列化返回
@ApiModel(value = "获取帖子详情模板")
@Data
public class DiscussPostsDetailVO implements Serializable {

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "图片集合")
    private String imgUrls;

    @ApiModelProperty(value = "帖子评论总数")
    private Integer commentCount;

    @ApiModelProperty(value = "0-失物招领; 1-拼车服务; 2-校园风景; 3-二手交易")
    private Integer type;

    @ApiModelProperty(value = "商品原总价")
    private BigDecimal amountOfOriginalPrice;

    @ApiModelProperty(value = "商品现总价")
    private BigDecimal amountOfCurrentPrice;

    @ApiModelProperty(value = "数据创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "数据最后更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "帖子评论列表")
    private List<Map<String, Object>> commentVoList;

}
